<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>赌我会瘦</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current bill-page  bg-light-gray">
      <header class="bar bar-nav fb-header">
        <a href="${ctx.host}/profile" class="icon icon-left pull-left"></a>
        <h1 class="title">账户明细</h1>
      </header>
      <div class="content">
        <div class="list-block bill-list">
          <c:forEach var="item" items="${userTransactions}">
            <div class="item-content">
              <div class="item-inner">
                <div class="item-title">
                  <div class="draw-name">${item.title}</div>
                  <div class="inner">
                    <div style="text-overflow: ellipsis; white-space: nowrap; overflow: hidden;">
                      <i class="red-circular"></i>${item.content}
                    </div>
                    <div>
                      <i class="iconfont icon-time"></i><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm" />
                    </div>
                  </div>
                </div>
                <div class="item-after ${item.income? 'color-blue' : 'color-red'}">
                  <fmt:formatNumber value="${item.balance / 100}" pattern="0.00"></fmt:formatNumber>
                元</div>
              </div>
            </div>
          </c:forEach>
        </div>
      </div>
    </div>
  </div>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/cmomon.js" />
  <script type="text/javascript">
      require(['page/cmomon'], function(page) {
        page.init()
      })
    </script>
</body>
</html>